package cn.com.gof.behavior.ChainOfRos;

/**
 * <p>Title: Direct</p>  
 * <p>Description: </p>  
 * @author WangJun
 * @date 2018年9月10日 上午8:53:02
 */
public  class Direct extends Leader{

	public Direct(String name) {
		super(name);
	}

	@Override
	public void handRequest(LeaveRequest leave) {
		if(leave.getDays() < 3) {
			System.out.println("员工："+leave.getEmpName()+",请假天数："+leave.getDays());
			System.out.println("主任审批通过");
		} else {
			if(this.nextLeader!= null) {
				nextLeader.handRequest(leave);
			}
		}
	}

}
